package com.attendance.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.attendance.entity.Leave;

public interface LeaveRepository extends PagingAndSortingRepository<Leave, Long>, JpaSpecificationExecutor<Leave> {

	@Query(value="from Leave a where a.staff.staffName like %?1%")
	public List<Leave> findLikeStaffName(String name);
	@Query(value="from Leave a where a.staff.staffNum like %?1%")
	public List<Leave> findLikeStaffNum(String num);
}
